Most motion detection or position optical encoders of the prior art comprise four photodiode channels, typically labelled namely A, A/, B and B/, respectively. Such optical encoders work by generating photocurrent using these channels, and are usually spatially arranged in the encoder such that they are 90 degrees out of phase apart with respect to one another. It is imperative that the code wheel of the encoder and the photodiodes be aligned properly and accurately in respect of one another. Otherwise, inaccuracies and errors result in the photocurrents produced by such channels, which lead to inaccurate position or motion information being generated by the encoder. Currently, no method or device exists to detect code wheel misalignment using photodiodes incorporated into an encoder integrated circuit (or “IC”).
In addition, most motion detection or position optical encoders of the prior art are designed and fabricated using well known bipolar processes, which enable photocurrent contrast to be obtained using the log-antilog architecture inherent in most BJT devices. However, with the advent of CMOS processes, encoder designs are being adapted to MOS devices for better scalability, lower cost and lower power. CMOS processes, however, are typically not amenable to the log-antilog architecture often employed in bipolar devices. As a result, more straightforward and conventional transimpedance amplification circuitry must be employed in CMOS processes. But to amplify photocurrents to reasonable voltage output levels, a resistor of the correct value must be used, which is a difficult proposition to implement in CMOS devices employing conventional transimpedance amplification circuits.
What is needed is a device and method for detecting code wheel misalignment using photodiodes incorporated, for example, into an encoder IC. What is also needed is a device and method for setting the gain of a transimpedance amplifier automatically, which depends on the input light power and the photocurrent generated.